package com.clearance.mine_clearance.config.poll;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Configuration
public class ThreadPoll {

    @Bean
    public ExecutorService cacheThreadPoolTest() {
        // 创建可缓存的无界线程池，可以指定线程工厂，也可以不指定线程工厂
        return Executors.newCachedThreadPool();
    }

}
